import Vue from 'vue'
import Router from 'vue-router'

Vue.use(Router)

/**
 * 框架级Router，保留几个框架级路径
 *
 * @name home 命中后跳转到实际主页
 * @name error 路由无法命中时跳转
 * @name empty 空页面，但是呈现布局UI
 * @name blank 匹配所有路由
 */
const baseRouter = [

    {
        path: '/',
        redirect: "/home"
    },

    {
        path: '/home',
        name: 'home',
        component: () => import('@/views/home')
    },
    {
        path: '/mapIndex',
        component: () => import('@/components/map/map_pg.vue')
    }

];

const router = new Router({
    mode: 'history',
    base: "/" + process.env.VUE_APP_ROOT,
    routes: [...baseRouter]
});

export default router
